package com.job.ming.Zuoye0712;


/**
 * @author Yangmingyu
 * @version 1.0
 * @since 2022-07-12 19:26:55
 */
public class Method {
    public static Attact Method(String a){
        if(a.equals("1") ){
            return new Qiang();
        }else if(a.equals("2")){
            return new Ruo();
        }else {
            return null;
        }
    }
}//工厂模式